AGI 2.917 Interpreter Upgrader v1.1 by Cold Turkey,Late September 2017
----------------------------------------------------------------------
*Fixed a bug where 2.43X interpreters were detected as newer than 2.917

Upgrades interpreters 2.411 - 2.915 to version 2.917. This will let you
run AGI games using the "-t" Tandy option on VGA based machines without
the graphical corruption.

Disclaimer: Upgrading the interpreter may cause other game anomolies.
Choosing the wrong game during the upgrade process will render the
game unplayable. Running the upgrade on a game more than once will
cause the backup files of the previous interpreter to be overwritten.

Files Included:
---------------
agi2917d.exe - DOS executable
agi2917_win.exe - Windows executable

Usgage:
-------
Copy the .exe matching your operating system to the folder of the
AGI game that you'd like to update. Then from the command line run
the exe. It will tell you what interpreter you are currently using. If
you are already at 2.917, it will confirm that you want to do the upgrade.
If you are at a version later than 2.917 or earlier than 2.411 it will
not perform the upgrade. You must then pick the game you are upgrading
to 2.917. The program even lets you enter your own game id if you've
got some weird homebrew AGI game.

Old interpreter files are backed up to the "backup" folder inside
the game directory.

Motivation:
-----------
There have been some recent remakes of Covox compatible sound devices
that plug into the printer port. Many moons ago a program named "temu"
was written that can emulate Tandy sound using the Covox. Temu works great
with AGI games when you using the "-t" command line argument to start them,
but graphical anomolies can occur on EGA/VGA systems when using an
interpreter older than 2.917. The Nerdly Pleasures blog has a great article
on how to update Sierra interpreters, but this requires users to manually
copy files and then use a hex editor to change some values. This program
simply takes care of all of those steps.

http://nerdlypleasures.blogspot.ca/2015/03/cajoling-sierra-and-lucasarts-games-to.html

This is not a decrypter
-----------------------
While I worked on a decrypter utility for unencrypting AGI games (AGI Disk Free!
Decryptor), that utility was for playing games with their current interpreter
without requiring the keydisk. This utility updates the interpreter with one that
is already unencrypted, so it does not perform any decryption. It simply updates
the intepreter files for your game and then patches the AGI file with the 
correct game id. While this has the added bonus of also removing the need for
a keydisk, this is merely a side benefit. I would recommend only performing
the interpreter upgrade when you need to actually use a newer interpreter
(such as for Tandy sound on a VGA based system), and use the decryptor for games
in which you don't want to perform an interpreter upgrade but want to play without
the keydisk.


This is the reference I used to pick which interpreters I would upgrade. I based
it off whether the game was using an encrypted object file, but I really don't
know if this is the right criteria. Maybe 2.089 can also be upgraded?

     AGI       Interp.  Agidata   Num of   Object file  LZW
   version       size     size    commands   encrypted
   ---------- -------- -------- ---------- ------------ ----
   2.089        34305     6656     155          No      No
   2.272        34816     6656     161          No      No
   2.411        38400     7680     169          Yes     No
   2.435        38400     7680     169          Yes     No
   2.439        38400     7680     169          Yes     No
   2.440        38400     7680     169          Yes     No
   2.915        39424     8192     173          Yes     No
   2.917        39424     8192     173          Yes     No


Links
-----
Temu: https://github.com/volkertb/temu-vsb/tree/master/temu
Covox remake: http://www.serdashop.com/CVX4
Wikipedia for Covox, includes schematic: https://en.wikipedia.org/wiki/Covox_Speech_Thing
Tandy Sound card for standard PCs: https://www.lo-tech.co.uk/product/tandy-sound-sn76489-adapter-pcb/

